import os

basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    SECRET_KEY = 'xiaoli'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    FLASKY_MAIL_SENDER = 'ljz2020comeon@163.com'
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    @staticmethod
    def init_app(app):
        pass


class DevelopmentConfig(Config):
    DEBUG = True
    MAIL_SERVER = 'smtp.163.com'
    MAIL_PORT = 25
    MAIL_USE_TLS = True
    MAIL_USERNAME = 'ljz2020comeon@163.com'
    MAIL_PASSWORD = 'LVsVS3B4mAJmaBMT'
    SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:200304%40l@101.126.81.112:3306/education_grade?charset=utf8'
    REDIS_HOST = '101.126.81.112'
    REDIS_PORT = 6379
    REDIS_DB = 11
    REDIS_PASSWORD = 'abC123456@'
    MONGO_URI = 'mongodb://admin:abC123456%40@101.126.81.112:27017/education?authSource=admin'
    # MONGO_USERNAME='admin'
    # MONGO_PASSWORD ='abC123456@'



config = {
    'development': DevelopmentConfig,
    'default': DevelopmentConfig
}
